package com.chuqiyun.authorization.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chuqiyun.authorization.dao.UserDao;
import com.chuqiyun.authorization.entity.User;
import com.chuqiyun.authorization.service.UserService;
import org.springframework.stereotype.Service;

/**
 * (User)表服务实现类
 *
 * @author mryunqi
 * @since 2023-04-14 17:36:26
 */
@Service("userService")
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {
    
    /**
    * @Author: mryunqi
    * @Description: 获取普通用户数据
    * @DateTime: 2023/4/16 21:24
    * @Params: String phone
    * @Return User
    */
    @Override
    public User getUser(String phone) {
        QueryWrapper<User> userQueryWrapper = new QueryWrapper<>();
        userQueryWrapper.eq("phone", phone);
        return this.getOne(userQueryWrapper);
    }

}

